package cn.geminis.crypto.csp.soft.rsa;

import cn.geminis.crypto.core.key.PrivateKey;
import cn.geminis.crypto.core.key.PublicKey;
import cn.geminis.crypto.csp.AbstractDigest;
import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers;
import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;

/**
 * @author puddi
 */
public class Sha1WithRsaSigner extends Sha256WithRsaSigner {

    public Sha1WithRsaSigner(PublicKey publicKey, PrivateKey privateKey) {
        super(publicKey, privateKey);
    }

    @Override
    protected AbstractDigest createDigest() {
        return new Sha1Digest();
    }

    @Override
    public String getAlgOid() {
        return PKCSObjectIdentifiers.sha1WithRSAEncryption.toString();
    }

    @Override
    public String getDigestAlgOid() {
        return OIWObjectIdentifiers.idSHA1.toString();
    }
}
